package com.swsc.xapp.xroom;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import java.util.List;

@Dao
public interface CorporationDao extends BaseDao<CorporationDO>{
    @Query("DELETE FROM sys_corporation WHERE tenant_no = :tenantNo AND organ_no =:organNo")
    void deleteByTenantOrgan(Integer tenantNo, Integer organNo);

    @Query("SELECT * FROM sys_corporation WHERE organ_no =:organNo")
    CorporationDO getByOrganNo(Integer organNo);

    @Override
    default String getTableName() {
        return "sys_corporation";
    }
}
